package com.linyaonan.leetcode.easy._944;

/**
 * @author: Lin
 * @date: 2020/1/8
 */
public class DeleteColumns {
    public int minDeletionSize(String[] A) {
        int count = 0;
        String start = A[0];
        int x = start.length();
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < A.length - 1; j++) {
                String one = A[j];
                String sec = A[j+1];
                if (one.charAt(i)>sec.charAt(i)) {
                    count++;
                    break;
                }
            }
        }
        return count;
    }
}
